Presentation Request
A JavaScript PresentationRequest
.
browser.set(StartPresentationCallback.class, (params, tell) -> {
Optional<MediaReceiver> mediaReceiver =
params.list()
.stream()
.filter(it -> it.name().startsWith("Samsung TV"))
.findAny();
if (mediaReceiver.isPresent()) {
MediaReceiver samsungTv = mediaReceiver.get();
if (samsungTv.supports(params.presentationRequest())) {
tell.start(samsungTv);
} else {
tell.cancel();
}
} else {
tell.cancel();
}
});
Content copied to clipboard
Since
7.29